package fr.utbm.gl52.smartgrid.util.properties;

import java.util.Date;

/**
 * Date version of a Property
 * 
 * @author maxime.oger@utbm.fr
 * @author francois.laithier@utbm.fr
 * @version 1.0
 */
public class PropertyDate implements Properties<Date> {

	private String name;
	private boolean error;
	private Date value;
	private Class<Date> c;

	public PropertyDate(String name, Date value, boolean error) {
		setName(name);
		setValue(value);
		setError(error);
		setType(Date.class);
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public void setError(boolean hasError) {
		this.error = hasError;
	}

	@Override
	public void setValue(Date date) {
		this.value = date;
	}

	@Override
	public void setType(Class<Date> c) {
		this.c = c;
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public Date getValue() {
		return this.value;
	}

	@Override
	public Class<Date> getType() {
		return this.c;
	}

	@Override
	public boolean hasError() {
		return this.error;
	}

}
